<script setup>
import {
  
    Delete
} from '@element-plus/icons-vue'
import { ref } from 'vue'
const list = ref([
    {
        "id": '',
        "title": "",
        "content": "",
        "user":'',
        "userid":"",
        "createTime": "",
        "updateTime": ""
    }
])

import {mylistservice} from'@/api/article.js'
const mylist =async()=>{
    let result=await mylistservice();
   list.value=result.data;
}
mylist();
</script>
<template>
    <el-card class="page-container">
        <template #header>
            <div class="header">
                <span>文章管理</span>
                <div class="extra">
                    <el-button type="primary">发布</el-button>
                </div>
            </div>
        </template>
        <el-table :data="list" style="width: 100%">
            <el-table-column label="序号" width="100" type="index"> </el-table-column>
            <el-table-column label="标题" prop="title"></el-table-column>
            <el-table-column label="发布者" prop="user"></el-table-column>
            <el-table-column label="发布日期" prop="createTime"></el-table-column>
            <el-table-column label="更新日期" prop="updateTime"></el-table-column>
            <el-table-column label="操作" width="100">
                <template #default="{ row }">
                    
                    <el-button :icon="Delete" circle plain type="danger"></el-button>
                </template>
            </el-table-column>
            <template #empty>
                <el-empty description="没有数据" />
            </template>
        </el-table>
    </el-card>
</template>

<style lang="scss" scoped>
.page-container {
    min-height: 100%;
    box-sizing: border-box;

    .header {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
}
</style>